<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>My Homework</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link rel='stylesheet' type='text/css' media='all' href='__TMPL__Public/css/issue.css' />
        <script src="__TMPL__Public/jquery/js/jquery-1.6.2.min.js" type="text/javascript" ></script>
		<script src="__TMPL__Public/jquery/js/jquery-ui-1.8.16.custom.min.js" type="text/javascript" ></script>
		<script type="text/javascript" src="__TMPL__Public/js/Calendar.js"></script>
		<script type="text/javascript">
			$(function() {

				$("#form1").submit(function(event) {

					/* stop form from submitting normally */
					event.preventDefault();

					/* get some values from elements on the page: */
					var $form = $(this), url = $form.attr('action');

					/* Send the data using post and put the results in a div */
					$.post(url, $("#form1").serialize(), function(result) {
						result = JSON.parse(result);
						if(result.status == 1) {
							alert("更新成功");
							window.location = "__APP__/Rank/allGradesAdmin";
						} else {
							alert("更新失败");
						}
					});
				});
			});
		</script>
	</head>
	<body id="threeColLayout" class="home">
		<div id="wrapper">
			<div id="header">
				<h1>修改作业内容</h1>
				<ul id="mainNav">
					<li>
						<a href="__APP__/Index/teacherMain" id="home">我的主页</a>
					</li>
					<li>
						<a href="">用户管理</a>
					</li>
					<li>
						<a href="__APP__/Login/logout">退出</a>
					</li>
				</ul>
			</div><!-- end #header -->
			<div id= "assigment">
				<fieldset id="info">
					<legend>
						作业信息
					</legend>
					<form method="post" action="__APP__/Edit/update" id="form1">
						<input type="hidden" name="id" value="{$id}" />
						<label>作业名称
							<input type="text" id="head" name="head" value='{$head}'/>
							</label >
							<br />
							<label>作业内容 								<textarea name="content" cols="40" rows ="20" >
								{$content} 
								</textarea></label>
							<br />
							<br />
							<label>截止时间
								<input name="deadline" type="text" id="deadline" size="10" maxlength="10" onclick="new Calendar().show(this);" readonly="readonly" value='{$deadline}' />
							</label>
							<br />
							<br />
							<label>
								<input type="submit" name="button" id="button" value="提交" />
							</label>
					</form>
				</fieldset>
			</div>
			<div id="footer"></div>
			<!-- end #footer -->
		</div><!-- end #wrapper -->
	</body>
</html>